diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py
index 722b1e69a..cb91f96f0 100644
--- a/sphinx/builders/linkcheck.py
+++ b/sphinx/builders/linkcheck.py
@@ -499,6 +499,14 @@ class HyperlinkAvailabilityCheckWorker(Thread):
                 # history contains any redirects, get last
                 if response.history:
                     code = response.history[-1].status_code
+                    final_url = response.url
+                    allowed = False
+                    for source_pattern, target_pattern in self.config.linkcheck_allowed_redirects.items():
+                        if re.match(source_pattern, uri) and re.match(target_pattern, final_url):
+                            allowed = True
+                            break
+                    if not allowed:
+                        return 'broken', 'Redirected to an unknown location', 0
                     return 'redirected', new_url, code
                 else:
                     return 'redirected', new_url, 0
@@ -682,6 +690,11 @@ def setup(app: Sphinx) -> Dict[str, Any]:
     # commonly used for dynamic pages
     app.add_config_value('linkcheck_anchors_ignore', ["^!"], None)
     app.add_config_value('linkcheck_rate_limit_timeout', 300.0, None)
+    # Add a new configuration option 'linkcheck_allowed_redirects' to specify allowed redirects.
+    # This option should be a dictionary mapping a pattern of the source URI to a pattern of the canonical URI.
+    # The default value is an empty dictionary, which means no redirects are allowed by default.
+    # Users can populate this dictionary in their Sphinx configuration to allow specific redirects.
+    app.add_config_value('linkcheck_allowed_redirects', {}, None)
 
     app.add_event('linkcheck-process-uri')
     app.connect('linkcheck-process-uri', rewrite_github_anchor)
diff --git a/tox.ini b/tox.ini
index a363e187f..3b8bc12d0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -27,7 +27,7 @@ setenv =
     PYTHONWARNINGS = all,ignore::ImportWarning:importlib._bootstrap_external,ignore::DeprecationWarning:site,ignore::DeprecationWarning:distutils,ignore::DeprecationWarning:pip._vendor.packaging.version
     PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:} --color yes
 commands=
-    python -X dev -m pytest --durations 25 {posargs}
+    python -X dev -m pytest -rA --durations 25 {posargs}
 
 [testenv:flake8]
 basepython = python3
